package com.ww.hegou;


import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

import java.io.IOException;
import java.io.InputStream;
import java.net.*;
import java.util.concurrent.TimeUnit;

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})

public class HegouApplication {

    public static void main(String[] args) throws IOException {
//        Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 1091));
//        //1. 创建OkhttpClient 对象
//        OkHttpClient client = new OkHttpClient().newBuilder().connectTimeout(60, TimeUnit.SECONDS).readTimeout(60, TimeUnit.SECONDS)
//                .proxy(proxy)
//                .build();
//
//        Request request = new Request.Builder()
//                .url("http://www.google.com/")
//                .get()
//                .build();
//        Response response= client.newCall(request).execute();
//        System.out.println(response.body().string());
        SpringApplication.run(HegouApplication.class, args);
    }

}
